<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Completing <code>yellow</code>',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<section id="dreams">
	<h2>Dream journal</h2>
	<p>
		I dreamed I was back in high school, except a boss scheduled when people would attend school as shifts as if it were a day job.
		We didn&apos;t all come in at once.
		I&apos;d come in for a day shift, but I&apos;d forgotten to bring my street clothing.
		I somehow had my gym clothing though.
		I got sweaty in gym class, then had to wear those clothes for the rest of the school shift.
		I went home when it was time, but I actually had to come back, as I&apos;d been scheduled for an evening shift four hours after going home.
		For the second shift, I remembered to bring both sets of clothing.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Okay, I think I understand a little better.
			I&apos;m still having some difficulties, but your post helped a lot.
		</p>
		<p>
			I think your formulas are off though.
			You can&apos;t have a less than symbol on either side of an equation; it just doesn&apos;t make any logical sense.
			I think you meant to use plus signs.
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest log</h2>
	<img src="/y.st./source/y.st./static/img/CC_BY-SA_3.0/minetest.net./weblog/2018/03/23.png" alt="My items-to-smelt chest is overfilled" class="framed-centred-image" width="800" height="600"/>
	<p>
		I finished the <code>yellow</code> mod&apos;s menu, including multi-page support and the option to rename beds.
		I thought that was the end of it, but on a whim, I tried testing a screwdriver on it.
		It turns out the comments in the code I borrowed are a lie.
		They say that they do things a particular way to avoid triggering the nbed-destruction function (which is only ever called from the bed nodes&apos; node-destruction handlers) when the beds get rotated, so when I bundled my warp point deletion functionality into the node-destruction handler for the foot of the bed, I assumed it wouldn&apos;t be set off.
		It doesn&apos;t work that way though.
		The node-destruction handler does get triggered, causing my yellow beds to lose their warp points when rotated.
		While testing, I did find that the very function that the comment said wouldn&apos;t get triggered did in fact get triggered.
		Logically, it should be triggered twice, once for the head of the bed and once for the foot, and using temporary notifications from within the function, I found it that did in fact happen.
	</p>
	<p>
		At first, I tried and failed to find a fix for the problem, so I simply disabled the option to rotate beds with the screwdriver.
		It was hacky, but it was better than allowing players to accidentally lose their warp points.
		As a side note, the yellow beds are designed to turn into yellow blocks of cotton if they end up on the map by mistake without data to make them work, so the first time someone tries to use a yellow bed that had been rotated, it&apos;d turn into cotton on them instead of functioning.
		I came up with an easy enough fix for the problem later in the day though, so now beds rotate without issue.
	</p>
</section>
END
);
